package com.mojo.log;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * logback实现类示例
 *
 * @author <a href="mailto:sjj@jianzhimao.com">mojo</a>
 * copyright (C), 2013-2021, 广州九尾信息科技有限公司
 * @date 2021/9/22 15:57
 */
@RestController
public class LogbackController {
    /**
     * springBoot默认使用slf4j日志门面以及Logback日志实现
     */
    private static final Logger logger = LoggerFactory.getLogger(LogbackController.class);

    @GetMapping("logLevel")
    public void logLevel() {
        logger.trace(">>>trace>>>");
        logger.debug(">>>debug>>>");
        logger.info(">>>info>>>");
        logger.warn(">>>warn>>>");
        logger.error(">>>error>>>");
    }
}
